<!--
 * @LastEditors: yuSeen
 * @LastEditTime: 2021-11-18 14:23:52
 * 为下拉选择模块设定值
-->
<template>
    <div class="item">
        <div class="flex input-line">
            <div class="tit">{{ title }}：</div>
            <div class="input">
                <el-select v-model="attr[ckey]" :placeholder="placeholder" size="mini">
                    <el-option
                        :label="item.name"
                        :value="item.value"
                        v-for="(item, index) in list"
                        :key="index"
                    ></el-option>
                </el-select>
            </div>
        </div>
    </div>
</template>

<script>
export default {
    name: 'setSelectAttr',
    props: {
        attr: {
            type: Object
        },
        ckey: {
            type: String
        },
        list: {
            type: Array
        },
        title: {
            type: String
        }
    },
    computed: {
        placeholder() {
            return '请选择' + this.title
        }
    }
}
</script>